﻿@model SDE_FIC.Models.Matricula
@using SDE_FIC.Models;

@{
    ViewBag.Title = "Matricula";
    Layout = "~/Views/Shared/_Layout_Sistema.cshtml";
    ViewBag.dataatual = DateTime.Now.Date.ToString("d");
}

<h2>@ViewBag.Title > Editar > Nova Matricula </h2>


<legend><h5>Turma: @ViewBag.turma_descricao 
</h5></legend>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        @*<div class="editor-label">
            @Html.LabelFor(model => model.idmatricula)
        </div>
        
        <div class="editor-field">
            @Html.EditorFor(model => model.idmatricula)
            @Html.ValidationMessageFor(model => model.idmatricula)
        </div>
        *@
        @*<div class="editor-field">
            @Html.HiddenFor(model => model.IdMatricula)
            @Html.ValidationMessageFor(model => model.IdMatricula)
        </div>*@
        <div class="editor-label">
            @Html.LabelFor(model => model.DataMatricula, "Data Matricula")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DataMatricula, new {@value = DateTime.Now })
            @Html.ValidationMessageFor(model => model.DataMatricula)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Aluno.IdAluno, "Aluno")
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => Model.Aluno.IdAluno, ViewBag.aluno_idaluno as SelectList, "")
            @Html.ValidationMessageFor(model => model.Aluno.IdAluno)
        </div>

@*        <div class="editor-label">
            @Html.LabelFor(model => model.Turma.Idturma, "Turma")
        </div>*@
        <div class="editor-field">
            @*@Html.EditorFor(model => model.turma_idturma)*@
            @*@Html.DropDownListFor(model => Model.Turma.Idturma, ViewBag.turma_idturma as SelectList, "")*@
            @Html.HiddenFor(model => Model.Turma.Idturma, new { @Value = ViewBag.turma_idturma })
            @*@Html.ValidationMessageFor(model => model.Turma.Idturma)*@
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Situacao, "Situação")
        </div>
        <div class="editor-field">
            @*@Html.EditorFor(model => model.situacao)*@
            @Html.DropDownListFor(model => model.Situacao, new SelectList(
                  new List<Object>{ 
                                   new { value = "Ativo" , text = "Ativo"  },
                                   new { value = "Evadido" , text = "Evadido" },
                                   new { value = "Desistente" , text = "Desistente" },                                                                      
                                  },"value","text"))
            @Html.ValidationMessageFor(model => model.Situacao)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DataSituacao, "Data Situação")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DataSituacao)
            @Html.ValidationMessageFor(model => model.DataSituacao)
        </div>

        <p>
            <input type="submit" value="Salvar" class="btn btn-sucsess " />
        </p>
    </fieldset>}

<div>
    @Html.ActionLink("Voltar para Listagem", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
